package com.learn.controller.axios;

import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;

import lombok.extern.slf4j.Slf4j;

import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;


@Slf4j
@RestController
@RequestMapping("axios")
public class AxiosController {

    @PostMapping("/post/params/v1")
    public String postMethodName(@RequestParam String name, @RequestParam String age) {
        log.info("Received name: {}, age: {}", name, age);
        return "Success! Received name: " + name + ", age: " + age;
    }
    
}
